import {
  postRequest,
  postRequestList,
  postRequestData,
  postRequestJson,
  getRequestInfo,
  importFile,
} from '../utils/request'
export const getReorderAdviceList = <T>(data?: any): Promise<IResponseList<T>> =>
  postRequestList(`/api/sop/sop/reorder/advice/pageReorderAdvice`, data)
export const getDisplayConfigList = <T>(data?: any): Promise<IResponseList<T>> =>
  postRequestList(`/api/sop/sop/reorder/displayConfig/query`, data)
export const importDisplayConfig = <T>(data?: any): Promise<IResponsePost<T>> =>
  importFile(`/api/sop/sop/reorder/displayConfig/importDisplayConfig`, data)
export const displayConfigExportExcel = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/reorder/displayConfig/exportExcel`, data)
export const updateDisplayConfig = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/reorder/displayConfig/updateDisplayConfig`, data)
export const getDelayDaysConfigList = <T>(data?: any): Promise<IResponseList<T>> =>
  postRequestList(`/api/sop/sop/reorder/delayDaysConfig/query`, data)
export const importDelayDaysConfig = <T>(data?: any): Promise<IResponsePost<T>> =>
  importFile(`/api/sop/sop/reorder/delayDaysConfig/importConfig`, data)
export const delayDaysConfigConfigExportExcel = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/reorder/delayDaysConfig/exportExcel`, data)
export const delayDaysConfigUpdateConfig = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/reorder/delayDaysConfig/updateConfig`, data)
export const updateIntentOrderDetail = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/intentOrder/updateIntentOrderDetail`, data)
export const updateIntentOrderTime = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/intentOrder/updateIntentOrder`, data)
export const updateReleaseSeasonDate = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/intentOrder/updateReleaseSeasonDate`, data)
export const updateIntentOrderBoxNum = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/intentOrder/updateIntentOrderBoxNum`, data)

export const getPeriodConfigList = <T>(data?: any): Promise<IResponseList<T>> =>
  postRequestList(`/api/sop/sop/reorder/periodConfig/query`, data)
export const importPeriodConfig = <T>(data?: any): Promise<IResponsePost<T>> =>
  importFile(`/api/sop/sop/reorder/periodConfig/importConfig`, data)
export const periodConfigExportExcel = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/reorder/periodConfig/exportExcel`, data)
export const periodConfigUpdateConfig = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/reorder/periodConfig/updateConfig`, data)

export const exportReorderInfo = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/reorder/advice/exportReorderInfo`, data)
export const exportAdviceIntentOrder = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/reorder/advice/exportIntentOrder`, data)
export const intentOrderCountTodo = <T>(data?: any): Promise<IResponseDetail<T>> =>
  postRequest(`/api/sop/sop/intentOrder/countTodo`, data)
export const getReorderUnConfigNum = <T>(data?: any): Promise<IResponsePost<T>> =>
  getRequestInfo(`/api/sop/sop/reorder/periodConfig/getUnConfigNumVO`, data)
export const getDisplayConfigUnConfigNum = <T>(data?: any): Promise<IResponsePost<T>> =>
  getRequestInfo(`/api/sop/sop/reorder/displayConfig/getUnConfigNum`, data)
export const getOTBInfo = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequest(`/api/sop/sop/reorder/advice/getOTBInfo`, data)
